Optimal. Leaf size=126 \[ -\frac {b^3 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{7/2} d}+\frac {\left (a^2-3 a b+3 b^2\right ) \tanh (c+d x)}{(a-b)^3 d}-\frac {(2 a-3 b) \tanh ^3(c+d x)}{3 (a-b)^2 d}+\frac {\tanh ^5(c+d x)}{5 (a-b) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3270, 398, 214}
\begin {gather*} \frac {\left (a^2-3 a b+3 b^2\right ) \tanh (c+d x)}{d (a-b)^3}-\frac {b^3 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a-b)^{7/2}}+\frac {\tanh ^5(c+d x)}{5 d (a-b)}-\frac {(2 a-3 b) \tanh ^3(c+d x)}{3 d (a-b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 398
Rule 3270
Rubi steps
\begin {align*} \int \frac {\text {sech}^6(c+d x)}{a+b \sinh ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^3}{a-(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^2-3 a b+3 b^2}{(a-b)^3}-\frac {(2 a-3 b) x^2}{(a-b)^2}+\frac {x^4}{a-b}-\frac {b^3}{(a-b)^3 \left (a-(a-b) x^2\right )}\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\left (a^2-3 a b+3 b^2\right ) \tanh (c+d x)}{(a-b)^3 d}-\frac {(2 a-3 b) \tanh ^3(c+d x)}{3 (a-b)^2 d}+\frac {\tanh ^5(c+d x)}{5 (a-b) d}-\frac {b^3 \text {Subst}\left (\int \frac {1}{a-(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{(a-b)^3 d}\\ &=-\frac {b^3 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{7/2} d}+\frac {\left (a^2-3 a b+3 b^2\right ) \tanh (c+d x)}{(a-b)^3 d}-\frac {(2 a-3 b) \tanh ^3(c+d x)}{3 (a-b)^2 d}+\frac {\tanh ^5(c+d x)}{5 (a-b) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.68, size = 119, normalized size = 0.94 \begin {gather*} \frac {-\frac {15 b^3 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{7/2}}+\frac {\left (8 a^2-26 a b+33 b^2+\left (4 a^2-13 a b+9 b^2\right ) \text {sech}^2(c+d x)+3 (a-b)^2 \text {sech}^4(c+d x)\right ) \tanh (c+d x)}{(a-b)^3}}{15 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(345\) vs.
\(2(114)=228\).
time = 1.84, size = 346, normalized size = 2.75
method | result | size |
risch | \(-\frac {2 \left (15 b^{2} {\mathrm e}^{8 d x +8 c}-30 a b \,{\mathrm e}^{6 d x +6 c}+90 b^{2} {\mathrm e}^{6 d x +6 c}+80 a^{2} {\mathrm e}^{4 d x +4 c}-230 a b \,{\mathrm e}^{4 d x +4 c}+240 b^{2} {\mathrm e}^{4 d x +4 c}+40 a^{2} {\mathrm e}^{2 d x +2 c}-130 a b \,{\mathrm e}^{2 d x +2 c}+150 b^{2} {\mathrm e}^{2 d x +2 c}+8 a^{2}-26 a b +33 b^{2}\right )}{15 d \left (a -b \right )^{3} \left (1+{\mathrm e}^{2 d x +2 c}\right )^{5}}+\frac {b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}+2 a^{2}-2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right )^{3} d}-\frac {b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}-2 a^{2}+2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right )^{3} d}\) | \(337\) |
derivativedivides | \(\frac {-\frac {2 \left (\left (-a^{2}+3 a b -3 b^{2}\right ) \left (\tanh ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {4}{3} a^{2}+\frac {16}{3} a b -8 b^{2}\right ) \left (\tanh ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {58}{15} a^{2}+\frac {166}{15} a b -\frac {66}{5} b^{2}\right ) \left (\tanh ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {4}{3} a^{2}+\frac {16}{3} a b -8 b^{2}\right ) \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-a^{2}+3 a b -3 b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (a -b \right )^{3} \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {2 b^{3} a \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{\left (a -b \right )^{3}}}{d}\) | \(346\) |
default | \(\frac {-\frac {2 \left (\left (-a^{2}+3 a b -3 b^{2}\right ) \left (\tanh ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {4}{3} a^{2}+\frac {16}{3} a b -8 b^{2}\right ) \left (\tanh ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {58}{15} a^{2}+\frac {166}{15} a b -\frac {66}{5} b^{2}\right ) \left (\tanh ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {4}{3} a^{2}+\frac {16}{3} a b -8 b^{2}\right ) \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-a^{2}+3 a b -3 b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (a -b \right )^{3} \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {2 b^{3} a \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{\left (a -b \right )^{3}}}{d}\) | \(346\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 2895 vs.
\(2 (114) = 228\).
time = 0.45, size = 6046, normalized size = 47.98 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 253 vs.
\(2 (114) = 228\).
time = 0.69, size = 253, normalized size = 2.01 \begin {gather*} -\frac {\frac {15 \, b^{3} \arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \sqrt {-a^{2} + a b}} + \frac {2 \, {\left (15 \, b^{2} e^{\left (8 \, d x + 8 \, c\right )} - 30 \, a b e^{\left (6 \, d x + 6 \, c\right )} + 90 \, b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 80 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} - 230 \, a b e^{\left (4 \, d x + 4 \, c\right )} + 240 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 40 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - 130 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 150 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 8 \, a^{2} - 26 \, a b + 33 \, b^{2}\right )}}{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{5}}}{15 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.89, size = 1152, normalized size = 9.14 \begin {gather*} \frac {16}{\left (a\,d-b\,d\right )\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}-\frac {32}{5\,\left (a\,d-b\,d\right )\,\left (5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1\right )}+\frac {\mathrm {atan}\left (\left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\left (\frac {4\,b}{d\,{\left (a-b\right )}^3\,\sqrt {b^6}\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )}+\frac {\left (2\,a-b\right )\,\left (2\,a^4\,d\,\sqrt {b^6}+b^4\,d\,\sqrt {b^6}-5\,a\,b^3\,d\,\sqrt {b^6}-7\,a^3\,b\,d\,\sqrt {b^6}+9\,a^2\,b^2\,d\,\sqrt {b^6}\right )}{b^5\,\sqrt {-a\,d^2\,{\left (a-b\right )}^7}\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )\,\sqrt {-a^8\,d^2+7\,a^7\,b\,d^2-21\,a^6\,b^2\,d^2+35\,a^5\,b^3\,d^2-35\,a^4\,b^4\,d^2+21\,a^3\,b^5\,d^2-7\,a^2\,b^6\,d^2+a\,b^7\,d^2}}\right )-\frac {\left (2\,a-b\right )\,\left (b^4\,d\,\sqrt {b^6}-3\,a\,b^3\,d\,\sqrt {b^6}-a^3\,b\,d\,\sqr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)\,{\left (a-b\right )}^2\,\left (a\,d-b\,d\right )}+\frac {4\,\left (a\,b-b^2\right )}{{\left (a-b\right )}^2\,\left (a\,d-b\,d\right )\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {8\,\left (4\,a-3\,b\right )}{3\,\left (a-b\right )\,\left (a\,d-b\,d\right )\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________